package com.lk.client.loadbanlance;

import com.lk.entity.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
 * 最后一个
 * @author kun.li
 */
public class LastRoute implements Route {
    @Override
    public Service switchService(Set<Service> serviceSet) {
        List<Service> services = new ArrayList<>(serviceSet);
        return services.get(services.size() - 1);
    }
}
